<?php
namespace Site\Widget;
use Think\Controller;

class FormWidget extends Controller {

    public function editor($data){
        $this->assign(array(
            'name'      =>  v($data,'name','content'),
            'content'   =>  v($data,'content',''),
            'height'    =>  v($data,'height',600)
        ));

        return $this->fetch('Widget:editor');
    } 

    public function datetime($data) {
        $this->assign(array(
            'name'      =>  v($data,'name','datetime'),
            'datetime'  =>  v($data,'datetime',NOW_TIME),
        ));

        return $this->fetch('Widget:datetime');
    }
}
?>
